home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 51 / 051.d81 / sir tommy (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  6KB  |  203 lines

  1. 10 poke53281,0:poke53280,11:printchr$(14);chr$(8);
  2. 15 print"[147]       [158]     [204][207][193][196][211][212][193][210] [208]resents"
  3. 20 print"       [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  4. 30 print"       [154][176][192][174][176][178][174][176][192][174]  [176][178][174][176][192][174][176][178][174][176][178][174][176] [174]"
  5. 40 print"       [173][192][174] [221] [171][178][189]   [221] [221] [221][221][221][221][221][221][221][173][178][189]"
  6. 50 print"       [173][192][189][173][177][189][173][173][189]   [177] [173][192][189][173] [189][173] [189] [177]"
  7. 60 print"       [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  8. 70 print"         [154][193] [199]ame of [207]ld [208]atience"
  9. 80 print"         [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  10. 90 print"            1] [208]lay"
  11. 100 print"            2] [201]nstructions"
  12. 110 print"            3] [197]xit [208]rogram"
  13. 120 print"    [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  14. 130 print"    [150]     by [194]arbara [200]. [211]chulak      "
  15. 140 print"    [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  16. 150 getk$:ifk$=""then150
  17. 160 k=val(k$):ifk<1ork>3then150
  18. 170 ifk=3thengoto 20000
  19. 180 ifk=2thengosub1470:run
  20. 190 print"[147]               [211]huffling..."
  21. 200 fori=14to15:poke781,i:sys59903:next
  22. 210 dimt(52),a(52),s(52),w(5,52),wc(5)
  23. 220 x=rnd(-ti):js=56320:s=54272
  24. 230 fori=0to24:pokes+i,0:next
  25. 240 fori=1to4:a(i)=193:next
  26. 250 fori=5to8:a(i)=202:next
  27. 260 fori=9to12:a(i)=209:next
  28. 270 fori=13to16:a(i)=203:next
  29. 280 fori=17to20:a(i)=176:next
  30. 290 fori=21to24:a(i)=178:next
  31. 300 fori=25to28:a(i)=179:next
  32. 310 fori=29to32:a(i)=180:next
  33. 320 fori=33to36:a(i)=181:next
  34. 330 fori=37to40:a(i)=182:next
  35. 340 fori=41to44:a(i)=183:next
  36. 350 fori=45to48:a(i)=184:next
  37. 360 fori=49to52:a(i)=185:next
  38. 370 s(0)=160:fori=1to5:w(i,0)=160:next
  39. 380 fori=1to5:wc(i)=0:next
  40. 390 fori=1to52:t(i)=0:next
  41. 400 fori=1to52
  42. 410 r=int(rnd(1)*52)+1
  43. 420 ift(r)=1then410
  44. 430 s(i)=a(r):t(r)=1
  45. 440 next
  46. 450 :
  47. 460 a$="[156][176][192][192][192][174]":b$="[156][221]   [146][156][221]":c$="[156][173][192][192][192][189]"
  48. 470 print"[147][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]";
  49. 480 print"[154]               [211]ir [212]ommy                ";
  50. 490 print"[146][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  51. 500 printtab(10):fori=1to4:printa$;:next
  52. 510 print:printtab(10):fori=1to4:printb$;:next
  53. 520 print:printtab(10):fori=1to4:printb$;:next
  54. 530 print:printtab(10):fori=1to4:printb$;:next
  55. 540 print:printtab(10):fori=1to4:printc$;:next
  56. 550 print:printtab(5):fori=1to5:printa$;:next
  57. 560 print:printtab(5):fori=1to5:printb$;:next
  58. 570 print:printtab(5):fori=1to5:printb$;:next
  59. 580 print:printtab(5):fori=1to5:printb$;:next
  60. 590 print:printtab(5):fori=1to5:printc$;:next
  61. 600 print:printtab(7)"s    w    w    w    w"
  62. 610 print""tab(6)"[159]   "
  63. 620 printtab(6)"   "
  64. 630 printtab(6)"   "
  65. 640 print""tab(30)"[176][192][192][192][192][192][192][174]"
  66. 650 printtab(30)"[221][209]=[209]uit[146][221]"
  67. 660 printtab(30)"[173][192][192][192][192][192][192][189]"
  68. 670 :
  69. 680 x=1551:cd=52:pokex,s(cd):pokex+s,3:p=1
  70. 690 m=0
  71. 700 pokex,peek(x)-128
  72. 710 pokex,peek(x)+128
  73. 720 getk$
  74. 730 ifk$="[145]"thengosub1250
  75. 740 ifk$=""thengosub1270
  76. 750 ifk$="[157]"thengosub1290
  77. 760 ifk$=""thengosub1310
  78. 770 ifk$=chr$(13)then820
  79. 780 ifk$="q"thenrun
  80. 790 pokex,peek(x)-128:fort=1to25:next
  81. 800 goto710
  82. 810 :
  83. 820 gosub1340:m=m+1:ifm=2then870
  84. 830 ifpeek(x)=160thengosub1390:goto690
  85. 840 ifp<1andp>5thengosub1390:goto690
  86. 850 b=peek(x):c=x:pi=p:goto700
  87. 860 :
  88. 870 ifp=1thengosub1390:goto690
  89. 880 ifpi<>1then950
  90. 890 ifp<>2andp<>3andp<>4andp<>5then950
  91. 900 cd=cd-1:poke1551,s(cd)
  92. 910 wc(p)=wc(p)+1:w(p,wc(p))=b
  93. 920 poke1551+(p-1)*5,b
  94. 930 goto1110
  95. 940 :
  96. 950 ifb=193andpeek(x)<>160thengosub1390:goto690
  97. 960 ifb=178andpeek(x)<>193thengosub1390:goto690
  98. 970 ifb=179andpeek(x)<>178thengosub1390:goto690
  99. 980 ifb=180andpeek(x)<>179thengosub1390:goto690
  100. 990 ifb=181andpeek(x)<>180thengosub1390:goto690
  101. 1000 ifb=182andpeek(x)<>181thengosub1390:goto690
  102. 1010 ifb=183andpeek(x)<>182thengosub1390:goto690
  103. 1020 ifb=184andpeek(x)<>183thengosub1390:goto690
  104. 1030 ifb=185andpeek(x)<>184thengosub1390:goto690
  105. 1040 ifb=176andpeek(x)<>185thengosub1390:goto690
  106. 1050 ifb=202andpeek(x)<>176thengosub1390:goto690
  107. 1060 ifb=209andpeek(x)<>202thengosub1390:goto690
  108. 1070 ifb=203andpeek(x)<>209thengosub1390:goto690
  109. 1080 ifpi=1thencd=cd-1:poke1551,s(cd)
  110. 1090 ifpi<>1thenwc(pi)=wc(pi)-1:poke1551+(pi-1)*5,w(pi,wc(pi))
  111. 1100 pokex,b
  112. 1110 ifpeek(1551)+peek(1556)+peek(1561)+peek(1566)+peek(1571)=160*5then1140
  113. 1120 goto690
  114. 1130 :
  115. 1140 w$="[158][150][156][158]"
  116. 1150 fori=1to10:gosub1340
  117. 1160 print"";left$(w$,i);"               [199]ame [215]on!                "
  118. 1170 fort=1to25:next
  119. 1180 next:fort=1to1000:next
  120. 1190 print"[154]       [208]ress [156][210][197][212][213][210][206][154] to play again       "
  121. 1200 getk$:ifk$=""then1200
  122. 1210 ifk$=chr$(13)thenrun
  123. 1220 print"[147]":end
  124. 1230 :
  125. 1240 :
  126. 1250 x=x-200:p=p-5:ifpeek(x)=32thenx=x+200:p=p+5
  127. 1260 return
  128. 1270 x=x+200:p=p+5:ifpeek(x)=32thenx=x-200:p=p-5
  129. 1280 return
  130. 1290 x=x-5:p=p-1:ifpeek(x)=32thenx=x+5:p=p+1
  131. 1300 return
  132. 1310 x=x+5:p=p+1:ifpeek(x)=32thenx=x-5:p=p-1
  133. 1320 return
  134. 1330 :
  135. 1340 pokes+24,15:pokes+5,9
  136. 1350 pokes+4,17:pokes+1,28:pokes,214
  137. 1360 fort=1to75:next
  138. 1370 pokes+4,16:return
  139. 1380 :
  140. 1390 print"  [176][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  141. 1400 print"  [221][201]llegal [205]ove![146][221]"
  142. 1410 print"  [173][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
  143. 1420 fort=1to1000:next
  144. 1430 print"                          "
  145. 1440 fori=1to2:print"                  ":next
  146. 1450 return
  147. 1460 :
  148. 1470 print"[147][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
  149. 1480 print"[221][159]      [201]nstructions for [211]ir [212]ommy      [146][221]";
  150. 1490 print"[171]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[179]";
  151. 1500 print"{$7d}[156]                                      {$7d}";
  152. 1510 print"{$7d}[156]   [153]Sir Tommy or Old Patience is a     {$7d}";
  153. 1520 print"[221] one-deck solitaire game.  [212]he object [221]";
  154. 1530 print"[221] of the game is to move the four aces [221]";
  155. 1540 print"[221] to the four foundations and then to  [221]";
  156. 1550 print"[221] build them up in sequence regardless [221]";
  157. 1560 print"[221] of suit.                             [221]";
  158. 1570 print"[221]                                      [221]";
  159. 1580 print"[221]   [195]ards from the stock pile ([153]s)      [221]";
  160. 1590 print"[221] should be played to a foundation if  [221]";
  161. 1600 print"[221] at all possible or to any of the     [221]";
  162. 1610 print"[221] four waste piles ([153]w).  [212]he top card  [221]";
  163. 1620 print"[221] of each waste pile may be played to  [221]";
  164. 1630 print"[221] any foundation at any time but may   [221]";
  165. 1640 print"[221] not be moved to another waste pile.  [221]";
  166. 1650 print"[221] [212]he game is won if all cards can be  [221]";
  167. 1660 print"[221] placed on the foundations.           [221]";
  168. 1670 print"[221]                                      [221]";
  169. 1680 print"[221]                                      [221]";
  170. 1690 print"[171]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[179]";
  171. 1700 print"{$7d}[156]             Press RETURN             [